package com.zhucan.order.controller;

import com.zhucan.order.application.command.OrderCommandService;
import com.zhucan.order.application.command.cmd.OrderCreateCommand;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhuCan
 * @description
 * @since 2022-07-05 15:29
 **/
@Slf4j
@RestController
@RequestMapping("/order")
@RequiredArgsConstructor
@Api
public class OrderController {

    private final OrderCommandService commandService;

    @PostMapping
    public void create(@RequestBody OrderCreateCommand command) {
        commandService.create(command);
    }
}
